Networks and Graph Theory - Minimum Spanning Trees.
Test Yourself 1.
Remember - with minumum spanning trees, we are including all vertices but looking for the minimum sum of the weights on the edges.
Kruskal's algorithm is used when the context allows us to start at any edge.
Prim's algorithm is used when we are given a starting point (vertex).
This page contains questions on: |
1. Applying Kruskal's algorithm. |
2. Applying Prim's algorithm. |
3. Comparing results obtained using both algorithms. |
Using Kruskal's algorithm. | 1. | A weighted network diagram is shown at the left.
What is the weight of the minimum spanning tree? |
||||||||||||||||||||||||||||||||||||
2.
Answer.Minimum weight is 11. |
A weighted network diagram is shown at the left.
What is the weight of the minimum spanning tree? |
|||||||||||||||||||||||||||||||||||||
3.
Answer.The minimum length of piping is 180 m and it will cost $9,000. |
In a holiday park consisting of eight cabins, the owner want to connect the electricity to each cabin. As electric cable costs $50 per metre, the owner needs to minimise the length of the connections but must connect all cabins.
What is the shortest path the owner can use to connect all the cabins? What is the total cost of the cable required? |
|||||||||||||||||||||||||||||||||||||
4. (i) What is the weight of the minimum spanning tree in the network shown below? (ii) Show the network for that minimum spanning tree. Answer.The weight of the minimum spanning tree is 37. |
||||||||||||||||||||||||||||||||||||||
5.
Answer.The minimum length of piping is 34 km along E-D-C-B-A. |
The diagram at the left shows 5 locations linked by possible paths to install water pipes. The numbers along the edges are the distances between the locations in kilometres. Water can be supplied to the system starting any any one of the five locations. What is the minimum total pipe length required to deliver water to all five locations? |
|||||||||||||||||||||||||||||||||||||
6. A network of pipes, connected to pumping stations labeled with the letters L to R, is shown in the diagram with the length of each pipe (in kilometres) indicated.
The network is to be reduced in complexity by eliminating several pipes but retaining all the pumping stations. Answer.The minimum length of piping is 142 kms. |
||||||||||||||||||||||||||||||||||||||
7. Need a table | ||||||||||||||||||||||||||||||||||||||
8. A park has five areas (A, B, C, D and E) all connected by pathways.
The following table shows the length of some of those pathways.
The following network diagram shows the information contained in the table as well as the relevant minimum spanning tree (shown in blue).
|
||||||||||||||||||||||||||||||||||||||
Using Prim's algorithm. | 9. Determine the minimum spanning tree and its weight for the following weighted network: Answer.Both networks have a total weight of 14. |
|||||||||||||||||||||||||||||||||||||
10. A nursery has to make deliveries of various garden supplies to four customers in a given locality. The operations manager takes the distances (in metres) between the customers from Google Maps and records them in the following table.
Answer.(i) Shortest distance = 1000 m. (ii) Shortest path is A-D-B-C. |
||||||||||||||||||||||||||||||||||||||
11. Robyn is helping her father to plan the watering system to be installed in the backyard. The plan is to connect the tap to eight spray points and so they prepare a map of their yard with the required spray points as shown below. They indicate the distance in metres between the points on the edges of their plan.
Because she is a good student in Maths, her father asks Robyn to analyse their map to determine the minimum amount of piping they will need to connect the eight spay points to the tap. Answer.The minimum length of piping is 31 metres. |
||||||||||||||||||||||||||||||||||||||
12. Check that the weighted network given in Q 4 above gives the same network diagram and the same weight when using Prim's algorithm if J is selected as the starting vertex. | ||||||||||||||||||||||||||||||||||||||
13. | ||||||||||||||||||||||||||||||||||||||
14. Fibre optic cables are to be laid at a rural school which consists of 5 buildings. The consultants have assessed the requirements for all feasible connections and estimated the cost (in hundreds of dollars) for each connection. Connections between some buildings are impractible. The consultants' cost estimates are summarised in the table below. The missing entries indicate the connections which cannot be considered.
|
||||||||||||||||||||||||||||||||||||||
15. |
||||||||||||||||||||||||||||||||||||||
16. | ||||||||||||||||||||||||||||||||||||||
Comparison | 17.The diagram below shows a network.
Answer.(i) Using Kruskal, the minimum path has a weight of 39 (see solutions for the path). (ii) Using Prim, the path is altered slightly and the weight increases to 41. |
|||||||||||||||||||||||||||||||||||||
18. . |